import { _list } from '../../common/service'
Page({
  data: {
    banner: 'http://tianyue.1juke.cn/res/guanjia.png',
    avatar: 'avatar.png',
    name: '',
    tel: '027–82885677',
    list: []
  },
  doCall (e) {
    const { tel } = e.currentTarget.dataset
    wx.makePhoneCall({
      phoneNumber: tel
    })
  },
  getList () {
    _list()
      .then(res => {
        const { IsSuccess, Data } = res.data
        if (IsSuccess) {
          console.log(Data)
          this.setData({
            list: Data
          })
        }
      })
      .catch(err => {
        console.log(err)
      })
  },
  onLoad (options) {
    this.getList()
  },
  onShow () {},
  onShareAppMessage() {
    return app.shareInfo
  }
})